QuickTime 4 API Documentation

Inside Macintosh: More Macintosh Toolbox

Previous | Chapter Top | Chapter Contents | Next |

Retrieving Component Errors

The Component Manager provides a routine that allows your application to retrieve the last error code that was generated by a component instance. Some component routines return error information as their function result. Other component routines set an error code that your application can retrieve using the GetComponentInstanceError function. Refer to the documentation supplied with the component for information on how that particular component handles errors.

GetComponentInstanceError

The GetComponentInstanceError function returns the last error generated by a specific connection to a component.

FUNCTION GetComponentInstanceError
                                         (aComponentInstance: ComponentInstance): OSErr;
aComponentInstance
A component instance that specifies the connection from which you want error information. Your application obtains the component instance from the OpenDefaultComponent or OpenComponent function.

DESCRIPTION

Once you have retrieved an error code, the Component Manager clears the error code for the connection. If you want to retain that error value, you should save it in your application's local storage.

RESULT CODES

noErr

0

No error

invalidComponentID

-3000

No component with this component identifier


© 1999 Apple Computer, Inc.

Previous | Chapter Top | Chapter Contents | Next